import axios from '../../utils/http'

export const getRangeList = async () => await axios.get('/bac/building/getRangeList')


// { points: [ [119.640521, 29.063426], [119.639104, 29.062038], [119.641851, 29.061644], ], title: "区域名称" }

export const setRange = async (data) => await axios.post('/setRange', data)

// updataRange

export const updataRange = async (data) => await axios.put('/bac/building/updataRange', data)

//获取时间配置
export const getConfig = async () => await axios.post('/cms/config/searchConfigList?configNames=counsellorImportDeadline&configNames=punchStartTime&configNames=punchEndTime&configNames=dataUpdateTime&configNames=closeDoorTime&configNames=studentCheckStartTime&configNames=studentCheckEndTime')

export const updataDate = (data) => axios.put('/cms/config',data)

//楼栋下拉
export async function getBuildingList() {
    const {
      data
    } = await axios.get('/bac/building/BuildList')
    return data
  }

// 无坐标楼栋下拉
export async function getNoFenceBuildList(number) {
  const {
    data
  } = await axios.get('/bac/building/NoFenceBuildList', {
    params: {
      number: number
    }
  })
  return data
}
